package com.smedi.ismedi.cronjob.api.dto.request;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/**
 * @author u
 */
@Data
public class JobInfoRequest {
    @ApiModelProperty(value = "任务Id自增返回")
    private Long id;

    @ApiModelProperty(value = "任务名称", required = true)
    @NotBlank(message = "任务名称为空！")
    @Size(max = 50, message = "任务名称最大50个字符！")
    private String name;

    @ApiModelProperty(value = "任务组名称", required = true)
    @NotBlank(message = "任务组名称为空！")
    @Size(max = 50, message = "任务组名称最大50个字符！")
    private String group;

    @ApiModelProperty(value = "cron 表达式", required = true)
    @NotBlank(message = "cron 表达式为空！")
    private String cronExpression;

    @ApiModelProperty(value = "任务字符描述！")
    private String description;

    @ApiModelProperty(value = "任务参数")
    private String parameter;

    @ApiModelProperty(value = "任务类型",example = "GET POST 全大写")
    private String type;

    @ApiModelProperty(value = "任务服务名称")
    private String serviceName;

    @ApiModelProperty(value = "任务执行路径")
    private String url;

    @ApiModelProperty(value = "运行状态，RUNNING（任务有效），PAUSE（任务暂停）")
    private Boolean pause;
}
